STEP 1: In order to use Python methods to display and do calculations with the current date and time, let's import a Python module. Importing a module into our program gives us pre-made tools to use.

Importing is the process of adding outside code to programs. We will import a Python module, code someone else wrote that you can use in your program.

  • Click on SUBJECT. Go to and drag in Import Datetime to the top of the code editor.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)